Lifetime Analysis of Electrification Futures BASE Installations with RELIABILITY APPROACHES: PV ICE, modifying lifetime (t50, t90, ProjecT) and Degradation
import os
from pathlib import Path
testfolder = str(Path().resolve().parent.parent / 'PV_ICE' / 'TEMP' / 'TeraWattWorkshop')
if not os.path.exists('my_folder'):
os.makedirs('my_folder')
print ("Your simulation will be stored in %s" % testfolder)
Your simulation will be stored in C:\Users\sayala\Documents\GitHub\CircularEconomy-MassFlowCalculator\PV_ICE\TEMP\TeraWattWorkshop
MATERIALS = ['glass','aluminium_frames','silver','silicon', 'copper']
MATERIAL = MATERIALS[0]
MODULEBASELINE = r'..\..\baselines\ElectrificationFutures_2021\baseline_modules_US_NREL_Electrification_Futures_2021_basecase.csv'
import PV_ICE
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
PV_ICE.__version__
'0+untagged.469.g6e6de9b.dirty'
plt.rcParams.update({'font.size': 22})
plt.rcParams['figure.figsize'] = (12, 5)
MATERIALBASELINE_GLASS = r'..\..\baselines\baseline_material_glass.csv'
MATERIALBASELINE_ALFrames = r'..\..\baselines\baseline_material_aluminium_frames.csv'
r1 = PV_ICE.Simulation(name='PV_ICE', path=testfolder)
r1.createScenario(name='baseline', file=MODULEBASELINE)
r1.scenario['baseline'].addMaterial('glass', file=MATERIALBASELINE_GLASS)
r1.scenario['baseline'].addMaterial('aluminium_frames', file=MATERIALBASELINE_ALFrames)
for mat in range (2, len(MATERIALS)):
MATERIALBASELINE=r'..\..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r1.scenario['baseline'].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
path = C:\Users\sayala\Documents\GitHub\CircularEconomy-MassFlowCalculator\PV_ICE\TEMP\TeraWattWorkshop
Life_Good = [3, 6, 9, 12, 15, 18, 21, 24]
degradation_Good = [-0.1, -0.2, -0.3, -0.4, -0.5, -0.6, -0.7, -0.8]
Life_Bad = [element * -1 for element in Life_Good]
degradation_Bad = [0.2, 0.4, 0.6, 0.8, 1.2, 1.6, 2.0, 3.0]
r4 = PV_ICE.Simulation(name='Reliability_Case1', path=testfolder)
for i in range(0, len(Life_Good)):
scenname = 'Lifetime_Improvements_of_'+str(Life_Good[i])+'_years'
r4.createScenario(name=scenname, file=MODULEBASELINE)
r4.scenario[scenname].data['mod_reliability_t50'] = r4.scenario[scenname].data['mod_reliability_t50'] + Life_Good[i]
r4.scenario[scenname].data['mod_reliability_t90'] = r4.scenario[scenname].data['mod_reliability_t90'] + Life_Good[i]
r4.scenario[scenname].data['mod_lifetime'] = r4.scenario[scenname].data['mod_lifetime'] + Life_Good[i]
r4.scenario[scenname].addMaterial('glass', file=MATERIALBASELINE_GLASS)
r4.scenario[scenname].addMaterial('aluminium_frames', file=MATERIALBASELINE_ALFrames)
for mat in range (2, len(MATERIALS)):
MATERIALBASELINE=r'..\..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r4.scenario[scenname].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
scenname = 'Lifetime_Decline_of_'+str(Life_Good[i])+'_years'
r4.createScenario(name=scenname, file=MODULEBASELINE)
r4.scenario[scenname].data['mod_reliability_t50'] = r4.scenario[scenname].data['mod_reliability_t50'] + Life_Bad[i]
r4.scenario[scenname].data['mod_reliability_t90'] = r4.scenario[scenname].data['mod_reliability_t90'] + Life_Bad[i]
r4.scenario[scenname].data['mod_lifetime'] = r4.scenario[scenname].data['mod_lifetime'] + Life_Bad[i]
r4.scenario[scenname].data['mod_reliability_t50'][r4.scenario[scenname].data['mod_reliability_t50']<=3.0] = 1.0
r4.scenario[scenname].data['mod_reliability_t90'][r4.scenario[scenname].data['mod_reliability_t90']<=3.0] = 2.0
r4.scenario[scenname].data['mod_lifetime'][r4.scenario[scenname].data['mod_lifetime']<=3.0] = 3.0
r4.scenario[scenname].addMaterial('glass', file=MATERIALBASELINE_GLASS)
r4.scenario[scenname].addMaterial('aluminium_frames', file=MATERIALBASELINE_ALFrames)
for mat in range (2, len(MATERIALS)):
MATERIALBASELINE=r'..\..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r4.scenario[scenname].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
path = C:\Users\sayala\Documents\GitHub\CircularEconomy-MassFlowCalculator\PV_ICE\TEMP\TeraWattWorkshop
C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:20: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:21: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:22: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Sanity Check
print('Scenario', list(r4.scenario.keys())[0] , 't50 in 2030: ', r4.scenario[list(r4.scenario.keys())[0]].data['mod_reliability_t50'][35])
print('Scenario', list(r4.scenario.keys())[1] , 't50 in 2030: ', r4.scenario[list(r4.scenario.keys())[1]].data['mod_reliability_t50'][35])
Scenario Lifetime_Improvements_of_3_years t50 in 2030: 43.0 Scenario Lifetime_Decline_of_3_years t50 in 2030: 37.0
r5 = PV_ICE.Simulation(name='Reliability_Case2', path=testfolder)
for i in range(0, len(Life_Good)):
scenname = 'Lifetime_Improvements_of_'+str(Life_Good[i])+'_years'
r5.createScenario(name=scenname, file=MODULEBASELINE)
r5.scenario[scenname].data['mod_reliability_t50'] = r5.scenario[scenname].data['mod_reliability_t50'] + Life_Good[i]
r5.scenario[scenname].data['mod_reliability_t90'] = r5.scenario[scenname].data['mod_reliability_t90'] + Life_Good[i]
r5.scenario[scenname].data['mod_lifetime'] = r5.scenario[scenname].data['mod_lifetime'] + Life_Good[i]
r5.scenario[scenname].data['mod_degradation'] = r5.scenario[scenname].data['mod_degradation'] + degradation_Good[i]
r5.scenario[scenname].data['mod_degradation'][r5.scenario[scenname].data['mod_degradation']<=0.0] = 0.000000001
r5.scenario[scenname].addMaterial('glass', file=MATERIALBASELINE_GLASS)
r5.scenario[scenname].addMaterial('aluminium_frames', file=MATERIALBASELINE_ALFrames)
for mat in range (2, len(MATERIALS)):
MATERIALBASELINE=r'..\..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r5.scenario[scenname].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
scenname = 'Lifetime_Decline_of_'+str(Life_Good[i])+'_years'
r5.createScenario(name=scenname, file=MODULEBASELINE)
r5.scenario[scenname].data['mod_reliability_t50'] = r5.scenario[scenname].data['mod_reliability_t50'] + Life_Bad[i]
r5.scenario[scenname].data['mod_reliability_t90'] = r5.scenario[scenname].data['mod_reliability_t90'] + Life_Bad[i]
r5.scenario[scenname].data['mod_lifetime'] = r5.scenario[scenname].data['mod_lifetime'] + Life_Bad[i]
r5.scenario[scenname].data['mod_degradation'] = r5.scenario[scenname].data['mod_degradation'] + degradation_Bad[i]
r5.scenario[scenname].data['mod_reliability_t50'][r5.scenario[scenname].data['mod_reliability_t50']<=3.0] = 1.0
r5.scenario[scenname].data['mod_reliability_t90'][r5.scenario[scenname].data['mod_reliability_t90']<=3.0] = 2.0
r5.scenario[scenname].data['mod_lifetime'][r5.scenario[scenname].data['mod_lifetime']<=3.0] = 3.0
r5.scenario[scenname].addMaterial('glass', file=MATERIALBASELINE_GLASS)
r5.scenario[scenname].addMaterial('aluminium_frames', file=MATERIALBASELINE_ALFrames)
for mat in range (2, len(MATERIALS)):
MATERIALBASELINE=r'..\..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r5.scenario[scenname].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
path = C:\Users\sayala\Documents\GitHub\CircularEconomy-MassFlowCalculator\PV_ICE\TEMP\TeraWattWorkshop
C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:10: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy # Remove the CWD from sys.path while we load stuff. C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:25: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:26: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:27: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
r6 = PV_ICE.Simulation(name='Reliability_Case3', path=testfolder)
for i in range(0, len(Life_Good)):
scenname = 'Lifetime_Improvements_of_'+str(Life_Good[i])+'_years'
r6.createScenario(name=scenname, file=MODULEBASELINE)
r6.scenario[scenname].data['mod_degradation'] = r6.scenario[scenname].data['mod_degradation'] + degradation_Good[i]
r6.scenario[scenname].data['mod_degradation'][r6.scenario[scenname].data['mod_degradation']<=0.0] = 0.000000001
r6.scenario[scenname].addMaterial('glass', file=MATERIALBASELINE_GLASS)
r6.scenario[scenname].addMaterial('aluminium_frames', file=MATERIALBASELINE_ALFrames)
for mat in range (2, len(MATERIALS)):
MATERIALBASELINE=r'..\..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r6.scenario[scenname].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
scenname = 'Lifetime_Decline_of_'+str(Life_Good[i])+'_years'
r6.createScenario(name=scenname, file=MODULEBASELINE)
r6.scenario[scenname].data['mod_degradation'] = r6.scenario[scenname].data['mod_degradation'] + degradation_Bad[i]
r6.scenario[scenname].data['mod_reliability_t50'][r6.scenario[scenname].data['mod_reliability_t50']<=3.0] = 1.0
r6.scenario[scenname].data['mod_reliability_t90'][r6.scenario[scenname].data['mod_reliability_t90']<=3.0] = 2.0
r6.scenario[scenname].data['mod_lifetime'][r6.scenario[scenname].data['mod_lifetime']<=3.0] = 3.0
r6.scenario[scenname].addMaterial('glass', file=MATERIALBASELINE_GLASS)
r6.scenario[scenname].addMaterial('aluminium_frames', file=MATERIALBASELINE_ALFrames)
for mat in range (2, len(MATERIALS)):
MATERIALBASELINE=r'..\..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r6.scenario[scenname].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
path = C:\Users\sayala\Documents\GitHub\CircularEconomy-MassFlowCalculator\PV_ICE\TEMP\TeraWattWorkshop
C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:7: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy import sys C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:19: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:20: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:21: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
r1.calculateMassFlow()
r4.calculateMassFlow()
r5.calculateMassFlow()
r6.calculateMassFlow()
r4.scenario[list(r4.scenario.keys())[-1]].data
Working on Scenario: baseline ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_3_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_3_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_6_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_6_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_9_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_9_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_12_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_12_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_15_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_15_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_18_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_18_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_21_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_21_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_24_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_24_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_3_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_3_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_6_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_6_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_9_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_9_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_12_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_12_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_15_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_15_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_18_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_18_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_21_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_21_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_24_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_24_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_3_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_3_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_6_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_6_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_9_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_9_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_12_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_12_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_15_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_15_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_18_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_18_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_21_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_21_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Improvements_of_24_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper Working on Scenario: Lifetime_Decline_of_24_years ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : aluminium_frames ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper
| year | new_Installed_Capacity_[MW] | mod_eff | mod_reliability_t50 | mod_reliability_t90 | mod_degradation | mod_lifetime | mod_MFG_eff | mod_EOL_collection_eff | mod_EOL_collected_recycled | ... | EOL_on_Year_50 | EOL_on_Year_51 | EOL_on_Year_52 | EOL_on_Year_53 | EOL_on_Year_54 | EOL_on_Year_55 | EoL_Collected | EoL_NotCollected | EoL_Recycled | EoL_NotRecycled_Landfilled | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1995 | 12.500000 | 12.500000 | 1.0 | 2.0 | 0.55 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 |
| 1 | 1996 | 9.667667 | 12.700000 | 1.0 | 2.0 | 0.55 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 7.500000e+03 | 4.250000e+04 | 3.000000e+03 | 4.500000e+03 |
| 2 | 1997 | 11.622000 | 12.880000 | 1.0 | 2.0 | 0.55 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.245925e+04 | 7.060243e+04 | 4.983701e+03 | 7.475551e+03 |
| 3 | 1998 | 11.781000 | 13.060000 | 1.0 | 2.0 | 0.55 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.265580e+04 | 7.171618e+04 | 5.062318e+03 | 7.593477e+03 |
| 4 | 1999 | 16.884667 | 13.240000 | 1.0 | 2.0 | 0.55 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.342715e+04 | 7.608720e+04 | 5.370861e+03 | 8.056292e+03 |
| 5 | 2000 | 20.926667 | 13.420000 | 1.0 | 2.0 | 0.60 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.633028e+04 | 9.253825e+04 | 6.532112e+03 | 9.798167e+03 |
| 6 | 2001 | 27.985000 | 13.600000 | 1.0 | 2.0 | 0.60 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 2.097990e+04 | 1.188861e+05 | 8.391960e+03 | 1.258794e+04 |
| 7 | 2002 | 42.476000 | 13.722222 | 1.0 | 2.0 | 0.60 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 2.691507e+04 | 1.525187e+05 | 1.076603e+04 | 1.614904e+04 |
| 8 | 2003 | 59.745000 | 13.844444 | 1.0 | 2.0 | 0.60 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 3.827476e+04 | 2.168903e+05 | 1.530991e+04 | 2.296486e+04 |
| 9 | 2004 | 94.752000 | 13.966667 | 1.0 | 2.0 | 0.60 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.480323e+04 | 3.105516e+05 | 2.192129e+04 | 3.288194e+04 |
| 10 | 2005 | 96.581173 | 14.088889 | 1.0 | 2.0 | 0.60 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 8.233199e+04 | 4.665480e+05 | 3.293280e+04 | 4.939920e+04 |
| 11 | 2006 | 98.213072 | 14.211111 | 1.0 | 2.0 | 0.60 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.004431e+05 | 5.691776e+05 | 4.017724e+04 | 6.026586e+04 |
| 12 | 2007 | 324.232748 | 14.333333 | 1.0 | 2.0 | 0.60 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.031928e+05 | 5.847591e+05 | 4.127712e+04 | 6.191567e+04 |
| 13 | 2008 | 314.585109 | 14.455556 | 1.0 | 2.0 | 0.60 | 3.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 2.214473e+05 | 1.254868e+06 | 8.857892e+04 | 1.328684e+05 |
| 14 | 2009 | 431.244804 | 14.577778 | 1.0 | 5.0 | 0.60 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 3.210910e+05 | 1.819516e+06 | 1.284364e+05 | 1.926546e+05 |
| 15 | 2010 | 719.844438 | 14.700000 | 1.0 | 6.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 3.857283e+05 | 2.185794e+06 | 1.542913e+05 | 2.314370e+05 |
| 16 | 2011 | 1781.377078 | 15.100000 | 1.0 | 6.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.360749e+05 | 3.037758e+06 | 2.144300e+05 | 3.216449e+05 |
| 17 | 2012 | 3064.162281 | 15.400000 | 1.0 | 6.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.185146e+06 | 6.715830e+06 | 4.740586e+05 | 7.110879e+05 |
| 18 | 2013 | 4037.449113 | 16.000000 | 4.0 | 9.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 2.188970e+06 | 1.240416e+07 | 8.755880e+05 | 1.313382e+06 |
| 19 | 2014 | 3722.199485 | 16.300000 | 4.0 | 9.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.569525e+06 | 8.893974e+06 | 6.278100e+05 | 9.417149e+05 |
| 20 | 2015 | 6834.328813 | 17.000000 | 4.0 | 9.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.493855e+06 | 8.465178e+06 | 5.975420e+05 | 8.963130e+05 |
| 21 | 2016 | 12897.665950 | 17.500000 | 4.0 | 9.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 2.293812e+06 | 1.299827e+07 | 9.175247e+05 | 1.376287e+06 |
| 22 | 2017 | 9784.506215 | 17.700000 | 4.0 | 9.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 3.922948e+06 | 2.223004e+07 | 1.569179e+06 | 2.353769e+06 |
| 23 | 2018 | 9352.529448 | 18.400000 | 4.0 | 9.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.808920e+06 | 3.291721e+07 | 2.323568e+06 | 3.485352e+06 |
| 24 | 2019 | 10949.782340 | 19.200000 | 4.0 | 9.0 | 0.30 | 6.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 7.366915e+06 | 4.174585e+07 | 2.946766e+06 | 4.420149e+06 |
| 25 | 2020 | 14454.770400 | 20.252588 | 9.0 | 14.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 8.068484e+06 | 4.572141e+07 | 3.227394e+06 | 4.841090e+06 |
| 26 | 2021 | 29515.260990 | 20.894865 | 9.0 | 14.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 7.676332e+06 | 4.349921e+07 | 3.070533e+06 | 4.605799e+06 |
| 27 | 2022 | 29515.260990 | 21.362882 | 9.0 | 14.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 6.234010e+06 | 3.532606e+07 | 2.493604e+06 | 3.740406e+06 |
| 28 | 2023 | 18890.512640 | 21.733112 | 9.0 | 14.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 4.373405e+06 | 2.478263e+07 | 1.749362e+06 | 2.624043e+06 |
| 29 | 2024 | 18890.512640 | 22.040370 | 9.0 | 14.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 3.593989e+06 | 2.036594e+07 | 1.437595e+06 | 2.156393e+06 |
| 30 | 2025 | 16238.879780 | 22.303539 | 9.0 | 14.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 4.341541e+06 | 2.460206e+07 | 1.736616e+06 | 2.604924e+06 |
| 31 | 2026 | 16238.879780 | 22.534045 | 9.0 | 14.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 6.203179e+06 | 3.515135e+07 | 2.481272e+06 | 3.721908e+06 |
| 32 | 2027 | 31283.159550 | 22.739342 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 9.161912e+06 | 5.191750e+07 | 3.664765e+06 | 5.497147e+06 |
| 33 | 2028 | 31283.159550 | 22.924572 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.180528e+07 | 6.689659e+07 | 4.722112e+06 | 7.083169e+06 |
| 34 | 2029 | 43951.271440 | 23.093431 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.339193e+07 | 7.588760e+07 | 5.356772e+06 | 8.035158e+06 |
| 35 | 2030 | 43951.271440 | 23.248674 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.350141e+07 | 7.650797e+07 | 5.400563e+06 | 8.100844e+06 |
| 36 | 2031 | 48105.304320 | 23.392405 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.240654e+07 | 7.030375e+07 | 4.962618e+06 | 7.443927e+06 |
| 37 | 2032 | 48105.304320 | 23.526271 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 1.029561e+07 | 5.834176e+07 | 4.118242e+06 | 6.177363e+06 |
| 38 | 2033 | 32257.627380 | 23.651585 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 7.668820e+06 | 4.345665e+07 | 3.067528e+06 | 4.601292e+06 |
| 39 | 2034 | 32257.627380 | 23.769414 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 1.207536e+08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.219179e+06 | 2.957535e+07 | 2.087672e+06 | 3.131507e+06 |
| 40 | 2035 | 20055.842860 | 23.880631 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 4.247878e+06 | 7.472766e+07 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 3.573031e+06 | 2.024718e+07 | 1.429212e+06 | 2.143819e+06 |
| 41 | 2036 | 20055.842860 | 23.985966 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 2.505287e+06 | 4.229223e+06 | 7.439949e+07 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 2.744367e+06 | 1.555141e+07 | 1.097747e+06 | 1.646620e+06 |
| 42 | 2037 | 19293.698110 | 24.086032 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 1.304452e+06 | 2.400070e+06 | 4.051605e+06 | 7.127488e+07 | 0.000000e+00 | 0.000000e+00 | 3.066658e+06 | 1.737773e+07 | 1.226663e+06 | 1.839995e+06 |
| 43 | 2038 | 19293.698110 | 24.181350 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 6.413271e+05 | 1.299310e+06 | 2.390610e+06 | 4.035635e+06 | 7.099393e+07 | 0.000000e+00 | 2.110666e+07 | 1.196044e+08 | 8.442663e+06 | 1.266399e+07 |
| 44 | 2039 | 50646.427670 | 24.272366 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 7.360841e+05 | 1.677186e+06 | 3.397930e+06 | 6.251878e+06 | 1.055392e+07 | 1.856620e+08 | 2.136106e+07 | 1.210460e+08 | 8.544424e+06 | 1.281664e+07 |
| 45 | 2040 | 50646.427670 | 24.359467 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 2.756905e+05 | 7.334521e+05 | 1.671189e+06 | 3.385780e+06 | 6.229523e+06 | 1.051618e+07 | 2.851869e+07 | 1.616059e+08 | 1.140748e+07 | 1.711121e+07 |
| 46 | 2041 | 19860.369070 | 24.442987 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 3.246075e+04 | 1.077392e+05 | 2.866314e+05 | 6.530970e+05 | 1.323155e+06 | 2.434483e+06 | 2.827512e+07 | 1.602257e+08 | 1.131005e+07 | 1.696507e+07 |
| 47 | 2042 | 19860.369070 | 24.523220 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 6.884172e+03 | 3.235455e+04 | 1.073867e+05 | 2.856936e+05 | 6.509602e+05 | 1.318826e+06 | 3.011204e+07 | 1.706349e+08 | 1.204481e+07 | 1.806722e+07 |
| 48 | 2043 | 39937.784020 | 24.600425 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 1.557782e+03 | 1.380013e+04 | 6.485850e+04 | 2.152693e+05 | 5.727065e+05 | 1.304926e+06 | 2.931505e+07 | 1.661186e+08 | 1.172602e+07 | 1.758903e+07 |
| 49 | 2044 | 39937.784020 | 24.674830 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 3.729162e+01 | 1.553085e+03 | 1.375852e+04 | 6.466292e+04 | 2.146202e+05 | 5.709795e+05 | 2.000853e+07 | 1.133817e+08 | 8.003412e+06 | 1.200512e+07 |
| 50 | 2045 | 32400.914340 | 24.746640 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 3.016633e+01 | 1.256338e+03 | 1.112969e+04 | 5.230781e+04 | 1.736128e+05 | 1.957579e+07 | 1.109295e+08 | 7.830318e+06 | 1.174548e+07 |
| 51 | 2046 | 32400.914340 | 24.816035 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 3.008198e+01 | 1.252824e+03 | 1.109856e+04 | 5.216154e+04 | 1.278336e+07 | 7.243902e+07 | 5.113343e+06 | 7.670014e+06 |
| 52 | 2047 | 44431.939710 | 24.883180 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 4.114063e+01 | 1.713384e+03 | 1.517858e+04 | 1.295771e+07 | 7.342704e+07 | 5.183085e+06 | 7.774627e+06 |
| 53 | 2048 | 44431.939710 | 24.948220 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 4.103337e+01 | 1.708917e+03 | 1.292690e+07 | 7.325242e+07 | 5.170759e+06 | 7.756139e+06 |
| 54 | 2049 | 62577.899930 | 25.011289 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 5.764563e+01 | 1.359060e+07 | 7.701337e+07 | 5.436238e+06 | 8.154357e+06 |
| 55 | 2050 | 62577.899930 | 25.072508 | 16.0 | 20.0 | 0.50 | 11.0 | 98.0 | 15.0 | 40.0 | ... | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 3.030751e+07 | 1.717426e+08 | 1.212301e+07 | 1.818451e+07 |
56 rows × 80 columns
Simulations = [r1, r4, r5, r6]
USyearly=pd.DataFrame()
keyword='mat_Total_Landfilled'
materials = ['glass', 'aluminium_frames','silicon', 'silver', 'copper']
# Loop over objects
for kk in range(0, len(Simulations)):
obj = Simulations[kk]
# Loop over Scenarios
for jj in range(0, len(obj.scenario)):
case = list(obj.scenario.keys())[jj]
for ii in range (0, len(materials)):
material = materials[ii]
foo = obj.scenario[case].material[material].materialdata[keyword].copy()
foo = foo.to_frame(name=material)
USyearly["Waste_"+material+'_'+obj.name+'_'+case] = foo[material]
filter_col = [col for col in USyearly if (col.startswith('Waste') and col.endswith(obj.name+'_'+case)) ]
USyearly['Waste_Module_'+obj.name+'_'+case] = USyearly[filter_col].sum(axis=1)
keyword='mat_Total_EOL_Landfilled'
materials = ['glass', 'aluminium_frames','silicon', 'silver', 'copper']
# Loop over objects
for kk in range(0, len(Simulations)):
obj = Simulations[kk]
# Loop over Scenarios
for jj in range(0, len(obj.scenario)):
case = list(obj.scenario.keys())[jj]
for ii in range (0, len(materials)):
material = materials[ii]
foo = obj.scenario[case].material[material].materialdata[keyword].copy()
foo = foo.to_frame(name=material)
USyearly["Waste_EOL_"+material+'_'+obj.name+'_'+case] = foo[material]
filter_col = [col for col in USyearly if (col.startswith('Waste') and col.endswith(obj.name+'_'+case)) ]
USyearly['Waste_EOL_Module_'+obj.name+'_'+case] = USyearly[filter_col].sum(axis=1)
keyword='mat_Total_MFG_Landfilled'
materials = ['glass', 'aluminium_frames','silicon', 'silver', 'copper']
# Loop over objects
for kk in range(0, len(Simulations)):
obj = Simulations[kk]
# Loop over Scenarios
for jj in range(0, len(obj.scenario)):
case = list(obj.scenario.keys())[jj]
for ii in range (0, len(materials)):
material = materials[ii]
foo = obj.scenario[case].material[material].materialdata[keyword].copy()
foo = foo.to_frame(name=material)
USyearly["Waste_MFG_"+material+'_'+obj.name+'_'+case] = foo[material]
filter_col = [col for col in USyearly if (col.startswith('Waste') and col.endswith(obj.name+'_'+case)) ]
USyearly['Waste_MFG_Module_'+obj.name+'_'+case] = USyearly[filter_col].sum(axis=1)
keyword='mat_Virgin_Stock'
materials = ['glass', 'aluminium_frames','silicon', 'silver', 'copper']
# Loop over objects
for kk in range(0, len(Simulations)):
obj = Simulations[kk]
# Loop over Scenarios
for jj in range(0, len(obj.scenario)):
case = list(obj.scenario.keys())[jj]
for ii in range (0, len(materials)):
material = materials[ii]
foo = obj.scenario[case].material[material].materialdata[keyword].copy()
foo = foo.to_frame(name=material)
USyearly["VirginStock_"+material+'_'+obj.name+'_'+case] = foo[material]
filter_col = [col for col in USyearly if (col.startswith('Waste') and col.endswith(obj.name+'_'+case)) ]
USyearly['VirginStock_Module_'+obj.name+'_'+case] = USyearly[filter_col].sum(axis=1)
USyearly = USyearly/1000000 # This is the ratio for Metric tonnes
#907185 -- this is for US tons
keyword='new_Installed_Capacity_[MW]'
# Loop over objects
for kk in range(0, len(Simulations)):
obj = Simulations[kk]
newcolname = keyword+'_'+obj.name
if newcolname in USyearly:
USyearly[newcolname] = USyearly[newcolname]+obj.scenario[list(obj.scenario.keys())[0]].data[keyword]
else:
USyearly[keyword+'_'+obj.name] = obj.scenario[list(obj.scenario.keys())[0]].data[keyword]
USyearly.head(10)
| Waste_glass_PV_ICE_baseline | Waste_aluminium_frames_PV_ICE_baseline | Waste_silicon_PV_ICE_baseline | Waste_silver_PV_ICE_baseline | Waste_copper_PV_ICE_baseline | Waste_Module_PV_ICE_baseline | Waste_glass_Reliability_Case1_Lifetime_Improvements_of_3_years | Waste_aluminium_frames_Reliability_Case1_Lifetime_Improvements_of_3_years | Waste_silicon_Reliability_Case1_Lifetime_Improvements_of_3_years | Waste_silver_Reliability_Case1_Lifetime_Improvements_of_3_years | ... | VirginStock_glass_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_aluminium_frames_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_silicon_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_silver_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_copper_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_Module_Reliability_Case3_Lifetime_Decline_of_24_years | new_Installed_Capacity_[MW]_PV_ICE | new_Installed_Capacity_[MW]_Reliability_Case1 | new_Installed_Capacity_[MW]_Reliability_Case2 | new_Installed_Capacity_[MW]_Reliability_Case3 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 35.574651 | 3.797870 | 70.644070 | 0.190322 | 0.002848 | 110.209761 | 35.574651 | 3.797870 | 70.644070 | 0.190322 | ... | 858.816756 | 312.916411 | 173.147230 | 10.735207 | 0.590784 | 1102.097610 | 12.500000 | 12.500000 | 12.500000 | 12.500000 |
| 1 | 27.083240 | 2.823082 | 52.722477 | 0.139265 | 0.002170 | 82.770233 | 27.080765 | 2.822129 | 52.722211 | 0.139237 | ... | 653.760167 | 232.517931 | 129.221067 | 7.853611 | 0.449724 | 827.710217 | 9.667667 | 9.667667 | 9.667667 | 9.667667 |
| 2 | 32.157941 | 3.015525 | 61.250645 | 0.159002 | 0.002610 | 96.585723 | 32.105284 | 2.995271 | 61.244996 | 0.158411 | ... | 774.935415 | 246.621562 | 150.108906 | 8.931884 | 0.532907 | 966.031357 | 11.622000 | 11.622000 | 11.622000 | 11.622000 |
| 3 | 32.468039 | 2.960336 | 60.017556 | 0.155840 | 0.002828 | 95.604599 | 32.135830 | 2.832799 | 59.981973 | 0.152122 | ... | 774.710482 | 231.970461 | 147.002794 | 8.551998 | 0.532939 | 957.180125 | 11.781000 | 11.781000 | 11.781000 | 11.781000 |
| 4 | 46.813626 | 4.447433 | 83.179517 | 0.221035 | 0.004625 | 134.666236 | 45.579554 | 3.974414 | 83.047507 | 0.207258 | ... | 1095.228821 | 320.746671 | 203.492186 | 11.556799 | 0.753571 | 1351.006942 | 16.884667 | 16.884667 | 16.884667 | 16.884667 |
| 5 | 59.565837 | 6.229870 | 99.797207 | 0.198543 | 0.007252 | 165.798708 | 56.180048 | 4.933714 | 99.435369 | 0.160818 | ... | 1339.206963 | 384.165960 | 243.529034 | 8.626585 | 0.921667 | 1670.276141 | 20.926667 | 20.926667 | 20.926667 | 20.926667 |
| 6 | 82.722903 | 9.677156 | 129.280686 | 0.297994 | 0.012400 | 221.991139 | 75.086780 | 6.757242 | 128.465244 | 0.213042 | ... | 1767.202399 | 497.229656 | 314.372312 | 10.832734 | 1.215639 | 2248.492608 | 27.985000 | 27.985000 | 27.985000 | 27.985000 |
| 7 | 129.411801 | 16.288027 | 190.718124 | 0.488621 | 0.022068 | 336.928640 | 114.425282 | 10.564930 | 189.118906 | 0.322137 | ... | 2658.390880 | 734.567652 | 462.399348 | 15.467028 | 1.825065 | 3427.187458 | 42.476000 | 42.476000 | 42.476000 | 42.476000 |
| 8 | 188.717650 | 25.714931 | 260.793459 | 0.752367 | 0.036466 | 476.014873 | 162.303897 | 15.645360 | 257.977109 | 0.459434 | ... | 3706.170965 | 1012.217029 | 629.999002 | 20.408053 | 2.546397 | 4865.730868 | 59.745000 | 59.745000 | 59.745000 | 59.745000 |
| 9 | 300.242888 | 41.223945 | 410.905403 | 1.188847 | 0.059776 | 753.620860 | 257.733923 | 25.058935 | 406.377665 | 0.718538 | ... | 5826.328448 | 1548.742479 | 979.795300 | 30.266716 | 4.005670 | 7712.784010 | 94.752000 | 94.752000 | 94.752000 | 94.752000 |
10 rows × 1180 columns
UScum = USyearly.copy()
UScum = UScum.cumsum()
UScum.head()
| Waste_glass_PV_ICE_baseline | Waste_aluminium_frames_PV_ICE_baseline | Waste_silicon_PV_ICE_baseline | Waste_silver_PV_ICE_baseline | Waste_copper_PV_ICE_baseline | Waste_Module_PV_ICE_baseline | Waste_glass_Reliability_Case1_Lifetime_Improvements_of_3_years | Waste_aluminium_frames_Reliability_Case1_Lifetime_Improvements_of_3_years | Waste_silicon_Reliability_Case1_Lifetime_Improvements_of_3_years | Waste_silver_Reliability_Case1_Lifetime_Improvements_of_3_years | ... | VirginStock_glass_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_aluminium_frames_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_silicon_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_silver_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_copper_Reliability_Case3_Lifetime_Decline_of_24_years | VirginStock_Module_Reliability_Case3_Lifetime_Decline_of_24_years | new_Installed_Capacity_[MW]_PV_ICE | new_Installed_Capacity_[MW]_Reliability_Case1 | new_Installed_Capacity_[MW]_Reliability_Case2 | new_Installed_Capacity_[MW]_Reliability_Case3 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 35.574651 | 3.797870 | 70.644070 | 0.190322 | 0.002848 | 110.209761 | 35.574651 | 3.797870 | 70.644070 | 0.190322 | ... | 858.816756 | 312.916411 | 173.147230 | 10.735207 | 0.590784 | 1102.097610 | 12.500000 | 12.500000 | 12.500000 | 12.500000 |
| 1 | 62.657891 | 6.620951 | 123.366547 | 0.329587 | 0.005018 | 192.979994 | 62.655416 | 6.619998 | 123.366281 | 0.329559 | ... | 1512.576923 | 545.434342 | 302.368298 | 18.588818 | 1.040508 | 1929.807828 | 22.167667 | 22.167667 | 22.167667 | 22.167667 |
| 2 | 94.815832 | 9.636476 | 184.617192 | 0.488589 | 0.007628 | 289.565717 | 94.760700 | 9.615269 | 184.611277 | 0.487970 | ... | 2287.512338 | 792.055903 | 452.477204 | 27.520702 | 1.573415 | 2895.839185 | 33.789667 | 33.789667 | 33.789667 | 33.789667 |
| 3 | 127.283871 | 12.596813 | 244.634747 | 0.644429 | 0.010456 | 385.170316 | 126.896530 | 12.448068 | 244.593250 | 0.640092 | ... | 3062.222820 | 1024.026364 | 599.479998 | 36.072700 | 2.106354 | 3853.019310 | 45.570667 | 45.570667 | 45.570667 | 45.570667 |
| 4 | 174.097497 | 17.044245 | 327.814264 | 0.865463 | 0.015082 | 519.836552 | 172.476083 | 16.422482 | 327.640757 | 0.847350 | ... | 4157.451641 | 1344.773035 | 802.972184 | 47.629499 | 2.859925 | 5204.026252 | 62.455333 | 62.455333 | 62.455333 | 62.455333 |
5 rows × 1180 columns
keyword='Installed_Capacity_[W]'
# Loop over objects
for kk in range(0, len(Simulations)):
obj = Simulations[kk]
# Loop over Scenarios
for jj in range(0, len(obj.scenario)):
case = list(obj.scenario.keys())[jj]
foo = obj.scenario[case].data[keyword]
foo = foo.to_frame(name=keyword)
UScum["Capacity_"+obj.name+'_'+case] = foo[keyword]
USyearly.index = r1.scenario['Today'].data['year']
UScum.index = r1.scenario['Today'].data['year']
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-24-cbbbe618b4f7> in <module> ----> 1 USyearly.index = r1.scenario['Today'].data['year'] 2 UScum.index = r1.scenario['Today'].data['year'] KeyError: 'Today'
UScum.tail(5)
UScum.to_csv('TERAWATT_Cumulative_Results.csv')
USyearly.to_csv('TERAWATT_Yearly_Results.csv')
UScum.keys()
mining2020_aluminum = 65267000
mining2020_silver = 22260
mining2020_copper = 20000000
mining2020_silicon = 8000000
list(USyearly.keys())
#VirginStock_glass_PVSC_Today
#VirginStock_glass_PVSC_Bifacial
plt.rcParams.update({'font.size': 10})
plt.rcParams['figure.figsize'] = (12, 8)
keyw='VirginStock_'
materials = ['glass', 'silicon','silver', 'copper', 'aluminium_frames']
fig, axs = plt.subplots(1,1, figsize=(4, 6), facecolor='w', edgecolor='k')
fig.subplots_adjust(hspace = .3, wspace=.2)
# Loop over CASES
name2 = 'PV_ICE_Today'
name0 = 'PV_ICE_Bifacial'
# ROW 2, Aluminum and Silicon: g- 4 aluminum k - 1 silicon orange - 3 copper gray - 2 silver
axs.plot(USyearly[keyw+materials[2]+'_'+name2]*100/mining2020_silver,
color = 'gray', linewidth=2.0, label='Silver')
axs.fill_between(USyearly.index, USyearly[keyw+materials[2]+'_'+name0]*100/mining2020_silver,
USyearly[keyw+materials[2]+'_'+name2]*100/mining2020_silver,
color='gray', lw=3, alpha=.3)
axs.plot(USyearly[keyw+materials[1]+'_'+name2]*100/mining2020_silicon,
color = 'k', linewidth=2.0, label='Silicon')
axs.fill_between(USyearly.index, USyearly[keyw+materials[1]+'_'+name0]*100/mining2020_silicon,
USyearly[keyw+materials[1]+'_'+name2]*100/mining2020_silicon,
color='k', lw=3, alpha=.5)
axs.plot(USyearly[keyw+materials[4]+'_'+name2]*100/mining2020_aluminum,
color = 'g', linewidth=2.0, label='Aluminum')
axs.fill_between(USyearly.index, USyearly[keyw+materials[4]+'_'+name0]*100/mining2020_aluminum,
USyearly[keyw+materials[4]+'_'+name2]*100/mining2020_aluminum,
color='g', lw=3, alpha=.3)
axs.plot(USyearly[keyw+materials[3]+'_'+name2]*100/mining2020_copper,
color = 'orange', linewidth=2.0, label='Copper')
axs.fill_between(USyearly.index, USyearly[keyw+materials[3]+'_'+name0]*100/mining2020_copper,
USyearly[keyw+materials[3]+'_'+name2]*100/mining2020_copper,
color='orange', lw=3, alpha=.3)
axs.set_xlim([2020,2050])
axs.legend()
#axs.set_yscale('log')
axs.set_ylabel('Virgin material needs as a percentage of \n 2020 global mining production capacity [%]')
#fig.savefig(os.path.join(testfolder,'Fig_1x1_MaterialNeeds Ratio to Production_NREL2018.png'), dpi=600)
bifacial_foo = USyearly[keyw+materials[4]+'_'+name0].iloc[-1]*100/mining2020_aluminum
today_foo = USyearly[keyw+materials[4]+'_'+name2].iloc[-1]*100/mining2020_aluminum
print(today_foo)
print(bifacial_foo)
print("In Year 2050, AL Needs Ratio to Mining Supply REDUCTION Of ", (today_foo-bifacial_foo)*100/today_foo-bifacial_foo)
bifacial_foo = USyearly[keyw+materials[4]+'_'+name0].sum()*100/mining2020_aluminum
today_foo = USyearly[keyw+materials[4]+'_'+name2].sum()*100/mining2020_aluminum
print(today_foo)
print(bifacial_foo)
print("Cumulative 2020-2050 AL Needs Ratio to Mining Supply REDUCTION Of ", (today_foo-bifacial_foo)*100/today_foo-bifacial_foo)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='VirginStock_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name0 = 'PV_ICE_Today'
name2 = 'PV_ICE_Bifacial'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k.', linewidth=5, label='S1: '+name0+' module mass')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='S1: '+name0+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'c.', linewidth=5, label='S2: '+name2+' module mass')
a0.plot(USyearly.index, glassmat, 'c', linewidth=5, label='S2: '+name2+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='c', alpha=0.3,
interpolate=True)
a0.legend()
a0.set_title('Yearly Virgin Material Needs by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.set_ylabel('Virgin Material Cumulative Needs 2020-2050 [Million Tonnes]')
a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
f.tight_layout()
fig.savefig(os.path.join(testfolder,'Fig_2x1_Yearly Virgin Material Needs by Scenario and Cumulatives_NREL2018.png'), dpi=600)
print("Cumulative Virgin Needs by 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_EOL_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name0 = 'PV_ICE_Today'
name2 = 'PV_ICE_Bifacial'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k.', linewidth=5, label='S1: '+name0+' module mass')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='S1: '+name0+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'c.', linewidth=5, label='S2: '+name2+' module mass')
a0.plot(USyearly.index, glassmat, 'c', linewidth=5, label='S2: '+name2+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='c', alpha=0.3,
interpolate=True)
a0.legend()
a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
f.tight_layout()
fig.savefig(os.path.join(testfolder,'Fig_2x1_Yearly EoL Waste by SCenario and Cumulatives_NREL2018.png'), dpi=600)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_EOL_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1, a2) = plt.subplots(1, 3, gridspec_kw={'width_ratios': [2,0.8,0.8]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name0 = 'Irena_EL_Today'
name2 = 'Irena_EL_Bifacial'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k', linestyle='dotted', linewidth=5, label='Today: module')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='Today: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Bifacial Evolution: module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Bifacial Evolution: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
a0.legend()
#a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050_Prev_A = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
#a1.yaxis.set_visible(False)
a1.yaxis.set_ticklabels([])
#a1.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
########################
# SUBPLOT 3
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050_Prev_B = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a2.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a2.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a2.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a2.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a2.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a2.yaxis.set_label_position("right")
a2.yaxis.tick_right()
a2.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a2.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a2.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'),
bbox_to_anchor=(0.6, -0.25),
fancybox=True, shadow=True, ncol=5)
a2.set_ylim([0, 28])
plt.sca(a2)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
f.tight_layout()
fig.savefig(os.path.join(testfolder,'Fig_2x1_Yearly EoL Waste by SCenario and Cumulatives_NREL2018.png'), dpi=600)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_EOL_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1, a2) = plt.subplots(1, 3, gridspec_kw={'width_ratios': [2,0.8,0.8]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name0 = 'Irena_RL_Today'
name2 = 'Irena_RL_Bifacial'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k', linestyle='dotted', linewidth=5, label='Today: module')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='Today: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Bifacial Evolution: module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Bifacial Evolution: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
a0.legend()
#a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[1] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_A.iloc[0]
dfcumulations2050_Prev_A = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.yaxis.set_ticklabels([])
a1.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
########################
# SUBPLOT 3
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[1] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_B.iloc[0]
dfcumulations2050_Prev_B = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a2.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a2.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a2.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a2.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a2.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a2.yaxis.set_label_position("right")
a2.yaxis.tick_right()
a2.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a2.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a2.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'),
bbox_to_anchor=(0.6, -0.25),
fancybox=True, shadow=True, ncol=5)
a2.set_ylim([0, 28])
plt.sca(a2)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
f.tight_layout()
fig.savefig(os.path.join(testfolder,'Fig_2x1_Yearly EoL Waste by SCenario and Cumulatives_NREL2018.png'), dpi=600)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
list(USyearly.keys())
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_EOL_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1, a2) = plt.subplots(1, 3, gridspec_kw={'width_ratios': [2,0.8,0.8]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name0 = 'PV_ICE_Today'
name2 = 'PV_ICE_Bifacial'
#name3 = 'BifacialProjection'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k', linestyle='dotted', linewidth=5, label='Today: module')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='Today: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Bifacial Evolution: module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Bifacial Evolution: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
'''
# SCENARIO 3 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name3]+USyearly[keyw+materials[1]+'_'+name3]+
USyearly[keyw+materials[2]+'_'+name3]+USyearly[keyw+materials[3]+'_'+name3]+
USyearly[keyw+materials[4]+'_'+name3])
glassmat = (USyearly[keyw+materials[0]+'_'+name3])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'g', linestyle='dotted', linewidth=5, label='Bifacial Evolution: module')
a0.plot(USyearly.index, glassmat, 'g', linewidth=5, label='Bifacial Evolution: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
'''
a0.legend(loc=2)
#a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[2] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_A.iloc[0]
dfcumulations2050.iloc[1] = dfcumulations2050_Prev_A.iloc[1]
dfcumulations2050_Prev_A = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.yaxis.set_ticklabels([])
a1.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
a1.yaxis.set_ticklabels([])
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
########################
# SUBPLOT 3
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[2] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_B.iloc[0]
dfcumulations2050.iloc[1] = dfcumulations2050_Prev_B.iloc[1]
dfcumulations2050_Prev_B = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a2.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a2.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a2.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a2.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a2.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a2.yaxis.set_label_position("right")
a2.yaxis.tick_right()
a2.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a2.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a2.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'),
bbox_to_anchor=(0.6, -0.25),
fancybox=True, shadow=True, ncol=5)
a2.set_ylim([0, 28])
plt.sca(a2)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
f.tight_layout()
fig.savefig(os.path.join(testfolder,'Fig_2x1_Yearly EoL Waste by SCenario and Cumulatives_NREL2018.png'), dpi=600)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
# PLOT FOR PAPER
plt.rcParams.update({'font.size': 20})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_EOL_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
#f, (a0, a1, a2) = plt.subplots(1, 3, gridspec_kw={'width_ratios': [2,0.8,0.8]})
f, (a0, a1, a2) = plt.subplots(1, 3, gridspec_kw={'width_ratios': [0.5,0.25,0.25]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name0 = 'PV_ICE_Today'
name2 = 'PV_ICE_Bifacial'
#name3 = 'BifacialProjection'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k', linestyle='dotted', linewidth=5, label='Current tech: module')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='Current tech: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Incrased bifacial: module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Incrased bifacial: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
'''
# SCENARIO 3 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name3]+USyearly[keyw+materials[1]+'_'+name3]+
USyearly[keyw+materials[2]+'_'+name3]+USyearly[keyw+materials[3]+'_'+name3]+
USyearly[keyw+materials[4]+'_'+name3])
glassmat = (USyearly[keyw+materials[0]+'_'+name3])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'g', linestyle='dotted', linewidth=5, label='Incrased bifacial: module')
a0.plot(USyearly.index, glassmat, 'g', linewidth=5, label='Bifacial Evolution: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
'''
#a0.title('Yearly')
a0.legend(loc=2)
a0.set_title('Yearly')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[2] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_A.iloc[0]
dfcumulations2050.iloc[1] = dfcumulations2050_Prev_A.iloc[1]
dfcumulations2050_Prev_A = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.yaxis.set_ticklabels([])
#a1.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
a1.yaxis.set_ticklabels([])
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n'], color='black', rotation=45, fontsize=17)
plt.tick_params(axis='y', which='minor', bottom=False)
plt.title('Current Tech')
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
########################
# SUBPLOT 3
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[2] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_B.iloc[0]
dfcumulations2050.iloc[1] = dfcumulations2050_Prev_B.iloc[1]
dfcumulations2050_Prev_B = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a2.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a2.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a2.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a2.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a2.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a2.yaxis.set_label_position("right")
a2.yaxis.tick_right()
a2.set_ylabel('Cumulative End of Life Material \nby 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a2.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a2.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'),
bbox_to_anchor=(1.2, -0.25),
fancybox=True, shadow=True, ncol=5)
a2.set_ylim([0, 28])
plt.sca(a2)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45, fontsize=17)
plt.tick_params(axis='y', which='minor', bottom=False)
plt.title('Increased bifacial')
f.tight_layout()
fig.savefig(os.path.join(testfolder,'Fig_2x1_Yearly EoL Waste by SCenario and Cumulatives_NREL2018.png'), dpi=600)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1, a2) = plt.subplots(1, 3, gridspec_kw={'width_ratios': [2,0.8,0.8]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name0 = 'Irena_EL_Today'
name2 = 'Irena_EL_Bifacial'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k', linestyle='dotted', linewidth=5, label='Today: module')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='Today: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Bifacial Evolution: module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Bifacial Evolution: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
a0.legend()
#a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050_Prev_A = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
#a1.yaxis.set_visible(False)
a1.yaxis.set_ticklabels([])
#a1.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
########################
# SUBPLOT 3
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050_Prev_B = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a2.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a2.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a2.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a2.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a2.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a2.yaxis.set_label_position("right")
a2.yaxis.tick_right()
a2.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a2.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a2.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'),
bbox_to_anchor=(0.6, -0.25),
fancybox=True, shadow=True, ncol=5)
a2.set_ylim([0, 28])
plt.sca(a2)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
f.tight_layout()
fig.savefig(os.path.join(testfolder,'Fig_2x1_Yearly EoL Waste by SCenario and Cumulatives_NREL2018.png'), dpi=600)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1, a2) = plt.subplots(1, 3, gridspec_kw={'width_ratios': [2,0.8,0.8]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name0 = 'Irena_RL_Today'
name2 = 'Irena_RL_Bifacial'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k', linestyle='dotted', linewidth=5, label='Today: module')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='Today: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Bifacial Evolution: module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Bifacial Evolution: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
a0.legend()
#a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[1] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_A.iloc[0]
dfcumulations2050_Prev_A = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.yaxis.set_ticklabels([])
a1.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
########################
# SUBPLOT 3
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[1] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_B.iloc[0]
dfcumulations2050_Prev_B = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a2.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a2.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a2.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a2.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a2.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a2.yaxis.set_label_position("right")
a2.yaxis.tick_right()
a2.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a2.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a2.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'),
bbox_to_anchor=(0.6, -0.25),
fancybox=True, shadow=True, ncol=5)
a2.set_ylim([0, 28])
plt.sca(a2)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'High\nElec.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
f.tight_layout()
fig.savefig(os.path.join(testfolder,'Fig_2x1_Yearly EoL Waste by SCenario and Cumulatives_NREL2018.png'), dpi=600)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1, a2) = plt.subplots(1, 3, gridspec_kw={'width_ratios': [2,0.8,0.8]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name0 = 'PV_ICE_Today'
name2 = 'PV_ICE_Bifacial'
#name3 = 'BifacialProjection'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k', linestyle='dotted', linewidth=5, label='Today: module')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='Today: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Bifacial Evolution: module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Bifacial Evolution: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
a0.legend(loc=2)
#a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[2] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_A.iloc[0]
dfcumulations2050.iloc[1] = dfcumulations2050_Prev_A.iloc[1]
dfcumulations2050_Prev_A = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.yaxis.set_ticklabels([])
a1.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
a1.yaxis.set_ticklabels([])
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'Bifacial'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
########################
# SUBPLOT 3
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
empty = 0
matcum.append(empty)
matcum.append(empty)
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
dfcumulations2050.iloc[2] = dfcumulations2050.iloc[0]
dfcumulations2050.iloc[0] = dfcumulations2050_Prev_B.iloc[0]
dfcumulations2050.iloc[1] = dfcumulations2050_Prev_B.iloc[1]
dfcumulations2050_Prev_B = dfcumulations2050.copy()
## Plot BARS Stuff
ind=np.arange(3)
width=0.35 # width of the bars.
p0 = a2.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a2.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a2.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a2.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a2.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a2.yaxis.set_label_position("right")
a2.yaxis.tick_right()
a2.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a2.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a2.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'),
bbox_to_anchor=(0.6, -0.25),
fancybox=True, shadow=True, ncol=5)
a2.set_ylim([0, 28])
plt.sca(a2)
plt.xticks(range(3), ['Irena\nEarly Loss', 'Irena\nRegular Loss', 'PV ICE\n', 'BIFACIAL.'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
f.tight_layout()
fig.savefig(os.path.join(testfolder,'Fig_2x1_Yearly EoL Waste by SCenario and Cumulatives_NREL2018.png'), dpi=600)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
USyearly.keys()
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [2,0.8]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name2 = 'Bifacial_SameInstalls'
name3 = 'Bifacial_ReducedInstalls'
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Same Installs: module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Same Installs: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
# SCENARIO 3 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name3]+USyearly[keyw+materials[1]+'_'+name3]+
USyearly[keyw+materials[2]+'_'+name3]+USyearly[keyw+materials[3]+'_'+name3]+
USyearly[keyw+materials[4]+'_'+name3])
glassmat = (USyearly[keyw+materials[0]+'_'+name3])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'gold', linestyle='dotted', linewidth=5, label='Reduced Installs: module')
a0.plot(USyearly.index, glassmat, 'gold', linewidth=5, label='Reduced Installs: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
a0.legend(loc=2)
#a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name3].loc[2050])
empty = 0
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
#a1.yaxis.set_ticklabels([])
a1.set_ylabel('Cumulative End of Life Material and MFG Scrap \n by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#a1.yaxis.set_ticklabels([])
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
#a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(2), ['Same\n Installs\n', 'Reduced\n Installs'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
change = dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
print("Reduced Installs reduces EOL Material & MFG Scrap landfilled by {} % ".format(round((change[0] - change[1])*100/change[0],2)))
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='VirginStock_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [2,0.8]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name2 = 'Bifacial_SameInstalls'
name3 = 'Bifacial_ReducedInstalls'
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Same Installs: module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Same Installs: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
# SCENARIO 3 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name3]+USyearly[keyw+materials[1]+'_'+name3]+
USyearly[keyw+materials[2]+'_'+name3]+USyearly[keyw+materials[3]+'_'+name3]+
USyearly[keyw+materials[4]+'_'+name3])
glassmat = (USyearly[keyw+materials[0]+'_'+name3])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'gold', linestyle='dotted', linewidth=5, label='Reduced Installs: module')
a0.plot(USyearly.index, glassmat, 'gold', linewidth=5, label='Reduced Installs: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
a0.legend(loc=2)
#a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
#a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name3].loc[2050])
empty = 0
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
#a1.yaxis.set_ticklabels([])
a1.set_ylabel('Cumulative Virgin Stock Needs [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#a1.yaxis.set_ticklabels([])
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
#a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(2), ['Same\n Installs\n', 'Reduced\n Installs'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
change1 = dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
print("Reduction in Manufacturing needs for Reduced Installs of {} %".format(round((change1[0]-change1[1])*100/change1[0],2)))
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='VirginStock_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [2,0.8]})
########################
# SUBPLOT 1
########################
#######################
# Loop over CASES
name2 = 'Bifacial_SameInstalls'
name3 = 'Bifacial_ReducedInstalls'
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'lightcoral', linestyle='dotted', linewidth=5, label='Irena Installs (no MFG losses): module')
a0.plot(USyearly.index, glassmat, 'lightcoral', linewidth=5, label='Irena Installs (no MFG losses):: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
# SCENARIO 3 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name3]+USyearly[keyw+materials[1]+'_'+name3]+
USyearly[keyw+materials[2]+'_'+name3]+USyearly[keyw+materials[3]+'_'+name3]+
USyearly[keyw+materials[4]+'_'+name3])
glassmat = (USyearly[keyw+materials[0]+'_'+name3])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'gold', linestyle='dotted', linewidth=5, label='Reduced Installs: module')
a0.plot(USyearly.index, glassmat, 'gold', linewidth=5, label='Reduced Installs: glass')
a0.fill_between(USyearly.index, glassmat, modulemat, color='lightcoral', alpha=0.3,
interpolate=True)
a0.legend(loc=2)
#a0.set_title('Yearly End of Life Material by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
#a0.set_ylim([0, 1.8])
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name3].loc[2050])
empty = 0
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
#a1.yaxis.set_ticklabels([])
a1.set_ylabel('Cumulative End of Life Material by 2050 [Million Tonnes]')
#a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#a1.yaxis.set_ticklabels([])
#plt.yticks(np.arange(0, 81, 10))
#a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
#a1.set_ylim([0, 28])
plt.sca(a1)
plt.xticks(range(2), ['\n Irena Installs \n(no MFG losses)) \n', 'Reduced\n Installs'], color='black', rotation=45)
plt.tick_params(axis='y', which='minor', bottom=False)
print("Cumulative Waste by EoL 2050 Million Tones by Scenario")
change2 = dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
print("Manufacturing Loss represents {} % of Virgin Stock Needs ".format(round((change1[0]-change2[0])*100/change1[0],2)))
filter_col_Capacity = [col for col in UScum if col.startswith('Capacity')]
filter_col_Capacity
UScum[filter_col_Capacity].loc[2050]/1e12
# Sanity Check
plt.plot(UScum['Capacity_Irena_EL_Today']/1e12, 'r', linewidth=4.0, label='Irena Early Loss')
plt.plot(UScum['Capacity_Irena_EL_Bifacial']/1e12, 'b.', linewidth=4.0, label='Irena Regular Loss')
print("No difference in Capacity between Today and Bifacial for Irena", sum(UScum['Capacity_Irena_EL_Today']/1e12-UScum['Capacity_Irena_EL_Bifacial']/1e12))
"""
p1 = (UScum['new_Installed_Capacity_[MW]BifacialProjection']-
UScum['new_Installed_Capacity_[MW]BifacialProjection_p2'])
UScum['new_Installed_Capacity_[MW]SameInstalls_p2'] = UScum['new_Installed_Capacity_[MW]SameInstalls'] + p1
"""
pass
filter_col_newInstalls = [col for col in UScum if col.startswith('new_Installed_Capacity_[MW]')]
UScum[filter_col_newInstalls].loc[2050]/1e6
list(UScum.keys())
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (7.5, 8)
keyw='Waste_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0) = plt.subplots(1, 1, gridspec_kw={'width_ratios': [2]})
plt.plot(UScum['new_Installed_Capacity_[MW]_Irena_EL']/1e6, 'k', label='Cumulative New Installs')
plt.plot(UScum['Capacity_Irena_EL_Bifacial']/1e12, 'r', linewidth=4.0, label='Irena EL Reliability')
plt.plot(UScum['Capacity_Irena_RL_Bifacial']/1e12, 'g', linewidth=4.0, label='Irena RL Reliability')#
plt.plot(UScum['Capacity_Bifacial_ReducedInstalls']/1e12, 'gold', linestyle='dashed', linewidth=4.0, label='PV ICE Reduced Installs')
plt.plot(UScum['Capacity_Bifacial_SameInstalls']/1e12, 'lightcoral', linewidth=4.0, label='PV ICE Reliability')
plt.legend()
#plt.yscale('log')
plt.xlim([2020, 2050])
#plt.ylim([5e10, 1e12])
plt.ylabel('Installed Capacity [TW]')
print("Nameplate Capcaity of Bifacial Installations augment by", (UScum['Capacity_Bifacial_SameInstalls'][2050]-UScum['Capacity_Bifacial_ReducedInstalls'][2050])*100/UScum['Capacity_Bifacial_SameInstalls'][2050])
print("% loss with Irena EL ")
((UScum['new_Installed_Capacity_[MW]_Irena_EL'].loc[2050]/1e6)-(UScum['Capacity_Irena_EL_Bifacial'].loc[2050]/1e12))*100/(UScum['new_Installed_Capacity_[MW]_Irena_EL'].loc[2050]/1e6)
print("% loss with Irena RL ")
((UScum['new_Installed_Capacity_[MW]_Irena_RL'].loc[2050]/1e6)-(UScum['Capacity_Irena_RL_Bifacial'].loc[2050]/1e12))*100/(UScum['new_Installed_Capacity_[MW]_Irena_RL'].loc[2050]/1e6)
print("% loss with PV ICE, Reducing Bifacial Installs ")
((UScum['new_Installed_Capacity_[MW]_Irena_RL'].loc[2050]/1e6)-(UScum['Capacity_Bifacial_ReducedInstalls'].loc[2050]/1e12))*100/(UScum['new_Installed_Capacity_[MW]_Irena_RL'].loc[2050]/1e6)
print("% loss with PV ICE, Keeping Bifacial Installs ")
((UScum['new_Installed_Capacity_[MW]_Irena_RL'].loc[2050]/1e6)-(UScum['Capacity_Bifacial_SameInstalls'].loc[2050]/1e12))*100/(UScum['new_Installed_Capacity_[MW]_Irena_RL'].loc[2050]/1e6)
# WORK ON THIS FOIR OPENEI
keyw=['mat_Virgin_Stock','mat_Total_EOL_Landfilled','mat_Total_MFG_Landfilled', 'mat_Total_Landfilled',
'new_Installed_Capacity_[MW]','Installed_Capacity_[W]']
keywprint = ['VirginMaterialDemand','EOLMaterial', 'ManufacturingScrap','ManufacturingScrapAndEOLMaterial',
'NewInstalledCapacity','InstalledCapacity']
keywunits = ['MetricTonnes', 'MetricTonnes', 'MetricTonnes', 'MetricTonnes',
'MW','MW']
keywdcumneed = [True,True,True,True,
True,False]
keywdlevel = ['material','material','material','material',
'module','module']
keywscale = [1000000, 1000000, 1000000, 1000000,
1,1e6]
#materials = ['glass', 'silicon', 'silver', 'copper', 'aluminum']
materials = ['glass','aluminium_frames','silver','silicon', 'copper']
# Loop over SF Scenarios
scenariolist = pd.DataFrame()
# Loop over Simularionts r1 r2, r3...
for kk in range(3, len(Simulations)):
obj = Simulations[kk]
# Loop over Scenarios
for zz in range(0, len(obj.scenario)):
case = list(obj.scenario.keys())[zz]
foo = pd.DataFrame()
for jj in range (0, len(keyw)):
if keywdlevel[jj] == 'material':
for ii in range (0, len(materials)):
sentit = '@value|'+keywprint[jj]+'|'+materials[ii].capitalize() +'#'+keywunits[jj]
foo[sentit] = obj.scenario[case].material[materials[ii]].materialdata[keyw[jj]]/keywscale[jj]
else:
sentit = '@value|'+keywprint[jj]+'|'+'PV' +'#'+keywunits[jj]
#sentit = '@value|'+keywprint[jj]+'#'+keywunits[jj]
foo[sentit] = obj.scenario[case].data[keyw[jj]]/keywscale[jj]
foo['@case'] = case
foo['@scenario|Module Composition'] = obj.name
foo['@timeseries|Year'] = obj.scenario[case].data.year
scenariolist = scenariolist.append(foo)
cols = [scenariolist.columns[-1]] + [col for col in scenariolist if col != scenariolist.columns[-1]]
scenariolist = scenariolist[cols]
cols = [scenariolist.columns[-1]] + [col for col in scenariolist if col != scenariolist.columns[-1]]
scenariolist = scenariolist[cols]
cols = [scenariolist.columns[-1]] + [col for col in scenariolist if col != scenariolist.columns[-1]]
scenariolist = scenariolist[cols]
#scenariolist = scenariolist/1000000 # Converting to Metric Tons
#scenariolist = scenariolist.applymap(lambda x: round(x, N - int(np.floor(np.log10(abs(x))))))
#scenariolist = scenariolist.applymap(lambda x: int(x))
scenariolist.to_csv('OPENEI 4 - Nation by Year.csv', index=False)
print("Done")
scenariolist
ReliabilityApproach=['Irena_RL', 'Irena_EL', 'PV_ICE', 'Bifacial_ReducedInstalls', 'Bifacial_SameInstalls']
ReliabilityApproachandScenario=['Irena_RL_Today', 'Irena_RL_Bifacial',
'Irena_EL_Today', 'Irena_EL_Bifacial',
'PV_ICE_Today','PV_ICE_Today',
'Bifacial_ReducedInstalls',
'Bifacial_SameInstalls']
TodayModuleComposition = ['Irena_RL_Today', 'Irena_EL_Today', 'PV_ICE_Today']
BifacialModuleComposition = ['Irena_RL_Bifacial', 'Irena_EL_Bifacial', 'Bifacial_SameInstalls', 'Bifacial_ReducedInstalls']
# WORK ON THIS FOIR OPENEI
keyw=['VirginStock','Waste_EOL','Waste_MFG', 'Waste',
'new_Installed_Capacity_[MW]','Capacity']
keywprint = ['VirginMaterialDemand','EOLMaterial', 'ManufacturingScrap','ManufacturingScrapAndEOLMaterial',
'NewInstalledCapacity','InstalledCapacity']
keywunits = ['MetricTonnes', 'MetricTonnes', 'MetricTonnes', 'MetricTonnes',
'MW','MW']
keywdcumneed = [True,True,True,True,
True,False]
keywdlevel = ['material','material','material','material',
'module','module']
keywscale = [1000000, 1000000, 1000000, 1000000,
1,1e6]
#materials = ['glass', 'silicon', 'silver', 'copper', 'aluminum']
materials = ['glass','aluminium_frames','silver','silicon', 'copper','Module']
# Loop over SF Scenarios
scenariolist = pd.DataFrame()
# Loop over Simularionts r1 r2, r3...
for kk in range(3, len(TodayModuleComposition)):
obj = Simulations[kk]
foo = pd.DataFrame()
for jj in range (0, len(keyw)):
if keywdlevel[jj] == 'material':
for ii in range (0, len(materials)):
sentit = '@value|'+keywprint[jj]+'|'+materials[ii].capitalize() +'#'+keywunits[jj]
foo[sentit] = obj.scenario[case].material[materials[ii]].materialdata[keyw[jj]]/keywscale[jj]
else:
sentit = '@value|'+keywprint[jj]+'|'+'PV' +'#'+keywunits[jj]
#sentit = '@value|'+keywprint[jj]+'#'+keywunits[jj]
foo[sentit] = obj.scenario[case].data[keyw[jj]]/keywscale[jj]
foo['@case'] = case
foo['@scenario|Solar Futures'] = obj.name
foo['@timeseries|Year'] = obj.scenario[case].data.year
scenariolist = scenariolist.append(foo)
cols = [scenariolist.columns[-1]] + [col for col in scenariolist if col != scenariolist.columns[-1]]
scenariolist = scenariolist[cols]
cols = [scenariolist.columns[-1]] + [col for col in scenariolist if col != scenariolist.columns[-1]]
scenariolist = scenariolist[cols]
cols = [scenariolist.columns[-1]] + [col for col in scenariolist if col != scenariolist.columns[-1]]
scenariolist = scenariolist[cols]
#scenariolist = scenariolist/1000000 # Converting to Metric Tons
#scenariolist = scenariolist.applymap(lambda x: round(x, N - int(np.floor(np.log10(abs(x))))))
#scenariolist = scenariolist.applymap(lambda x: int(x))
scenariolist.to_csv('OPENEI 4 - Nation by Year.csv', index=False)
print("Done")
"""
colNames = result.columns[result.columns.str.contains('|ManufacturingScrap|')]
result['@value|ManufacturingScrap|Module#MetricTonnes'] = result[colNames].sum(axis=1)
mask = df1['@scenario|Solar Futures']=='SameInstalls'
df1 = df1[~mask]
df1.rename(columns={'@scenario|Solar Futures': '@scenario|Module Composition Scenario'}, inplace=True)
"""
@scenario @ timeseries @ value|VirginMateiralDemand|Glass#MEtric Tonnes ........ PVV_ICE 2020 PV_ICE 2030
# WORK ON THIS FOIR OPENEI
keyw=['mat_Virgin_Stock','mat_Total_EOL_Landfilled','mat_Total_MFG_Landfilled', 'mat_Total_Landfilled',
'new_Installed_Capacity_[MW]','Installed_Capacity_[W]']
keywprint = ['VirginMaterialDemand','EOLMaterial', 'ManufacturingScrap','ManufacturingScrapAndEOLMaterial',
'NewInstalledCapacity','InstalledCapacity']
keywunits = ['MetricTonnes', 'MetricTonnes', 'MetricTonnes', 'MetricTonnes',
'MW','MW']
keywdcumneed = [True,True,True,True,
True,False]
keywdlevel = ['material','material','material','material',
'module','module']
keywscale = [1000000, 1000000, 1000000, 1000000,
1,1e6]
#materials = ['glass', 'silicon', 'silver', 'copper', 'aluminum']
materials = ['glass','aluminium_frames','silver','silicon', 'copper']
# Loop over SF Scenarios
scenariolist = pd.DataFrame()
# Loop over Simularionts r1 r2 ...
for kk in range(0, len(Simulations)):
obj = Simulations[kk]
# Loop over Scenarios
for zz in range(0, len(obj.scenario)):
case = list(obj.scenario.keys())[zz]
foo = pd.DataFrame()
for jj in range (0, len(keyw)):
if keywdlevel[jj] == 'material':
for ii in range (0, len(materials)):
sentit = '@value|'+keywprint[jj]+'|'+materials[ii].capitalize() +'#'+keywunits[jj]
foo[sentit] = obj.scenario[case].material[materials[ii]].materialdata[keyw[jj]]/keywscale[jj]
else:
sentit = '@value|'+keywprint[jj]+'|'+'PV' +'#'+keywunits[jj]
#sentit = '@value|'+keywprint[jj]+'#'+keywunits[jj]
foo[sentit] = obj.scenario[case].data[keyw[jj]]/keywscale[jj]
foo['@case'] = case
foo['@scenario|Solar Futures'] = obj.name
foo['@timeseries|Year'] = obj.scenario[case].data.year
scenariolist = scenariolist.append(foo)
cols = [scenariolist.columns[-1]] + [col for col in scenariolist if col != scenariolist.columns[-1]]
scenariolist = scenariolist[cols]
cols = [scenariolist.columns[-1]] + [col for col in scenariolist if col != scenariolist.columns[-1]]
scenariolist = scenariolist[cols]
cols = [scenariolist.columns[-1]] + [col for col in scenariolist if col != scenariolist.columns[-1]]
scenariolist = scenariolist[cols]
#scenariolist = scenariolist/1000000 # Converting to Metric Tons
#scenariolist = scenariolist.applymap(lambda x: round(x, N - int(np.floor(np.log10(abs(x))))))
#scenariolist = scenariolist.applymap(lambda x: int(x))
scenariolist.to_csv('OPENEI 4 - Nation by Year.csv', index=False)
print("Done")
#plt.plot(UScum['new_Installed_Capacity_[MW]BifacialProjection']/1e6, 'k', label='Cumulative New Installs')
#plt.plot(UScum['Capacity_Irena_EL_Bifacial']/1e12, 'r', linewidth=4.0, label='Irena EL Reliability')
#plt.plot(UScum['Capacity_Irena_RL_Bifacial']/1e12, 'g', linewidth=4.0, label='Irena RL Reliability')
#plt.plot(UScum['Capacity_BifacialProjection_SameInstalls']/1e12, 'lightcoral', linewidth=4.0, label='PV ICE Reliability')
#plt.plot(UScum['Capacity_BifacialProjection']/1e12, 'gold', linestyle='dashed', linewidth=4.0, label='PV ICE Reduced Installs')
firstgen = r1.scenario['Today'].data.WeibullParams.iloc[0]
ares = PV_ICE.weibull_cdf_vis(firstgen['alpha'],firstgen['beta'])
twentythirtygen = firstgen = r1.scenario['Today'].data.WeibullParams.iloc[-1]
bres = PV_ICE.weibull_cdf_vis(twentythirtygen['alpha'],twentythirtygen['beta'])
#userWeibulls = {'alpha': 3.4,
# 'beta': 4.5}
#userres = PV_ICE.weibull_cdf_vis(userWeibulls['alpha'],userWeibulls['beta'])
# Irena 'EL' 2016
alpha = 2.4928
Lifetime = 30
IrenaEarly = PV_ICE.weibull_cdf_vis(alpha, beta=Lifetime)
# Irena 'RL' 2016
alpha = 5.3759
Lifetime = 30
IrenaReg = PV_ICE.weibull_cdf_vis(alpha, beta=Lifetime)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (10, 8)
#plt.plot(ares, label=r'$ \alpha $ : '+str(round(firstgen['alpha'],2))+ r' $ \beta $ : '+ str(round(firstgen['beta'],2)) + ' PV ICE, gen 1995')
#plt.plot(bres, color='b', label=r'$ \alpha $ : '+str(round(twentythirtygen['alpha'],2))+ r' $ \beta $ : '+ str(round(twentythirtygen['beta'],2)) + ' PV ICE, gen 2050')
plt.plot(IrenaEarly, color='red', linewidth=16.0, label=r'$ \alpha $ : 2.49, Early Loss Baseline Irena 2016')
#plt.plot(IrenaReg, color='orange', linewidth=4.0, label=r'$ \alpha $ : 5.3759, Regular Loss Baseline Irena 2016')
#plt.legend()
plt.ylabel('Cumulative Distribution Function (CDF)')
plt.xlabel('Years since install')
plt.xlim([0,50])
ax = plt.gca()
ax.axes.xaxis.set_visible(False)
ax.axes.yaxis.set_visible(False)
#plt.legend(bbox_to_anchor=(1.05, 1.0), loc='bottom');
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (10, 8)
#plt.plot(ares, label=r'$ \alpha $ : '+str(round(firstgen['alpha'],2))+ r' $ \beta $ : '+ str(round(firstgen['beta'],2)) + ' PV ICE, gen 1995')
#plt.plot(bres, color='b', label=r'$ \alpha $ : '+str(round(twentythirtygen['alpha'],2))+ r' $ \beta $ : '+ str(round(twentythirtygen['beta'],2)) + ' PV ICE, gen 2050')
#plt.plot(IrenaEarly, color='red', linewidth=4.0, label=r'$ \alpha $ : 2.49, Early Loss Baseline Irena 2016')
plt.plot(IrenaReg, color='darkgreen', linewidth=16.0, label=r'$ \alpha $ : 5.3759, Regular Loss Baseline Irena 2016')
#plt.legend()
plt.ylabel('Cumulative Distribution Function (CDF)')
plt.xlabel('Years since install')
plt.xlim([0,50])
ax = plt.gca()
ax.axes.xaxis.set_visible(False)
ax.axes.yaxis.set_visible(False)
#plt.legend(bbox_to_anchor=(1.05, 1.0), loc='bottom');
from matplotlib.pyplot import gca,show
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (10, 8)
plt.plot(ares, linewidth=16.0, label=r'$ \alpha $ : '+str(round(firstgen['alpha'],2))+ r' $ \beta $ : '+ str(round(firstgen['beta'],2)) + ' PV ICE, gen 1995')
plt.plot(bres, linewidth=16.0, color='b', label=r'$ \alpha $ : '+str(round(twentythirtygen['alpha'],2))+ r' $ \beta $ : '+ str(round(twentythirtygen['beta'],2)) + ' PV ICE, gen 2050')
#plt.plot(IrenaEarly, color='red', linewidth=4.0, label=r'$ \alpha $ : 2.49, Early Loss Baseline Irena 2016')
#plt.plot(IrenaReg, color='orange', linewidth=4.0, label=r'$ \alpha $ : 5.3759, Regular Loss Baseline Irena 2016')
#plt.legend()
plt.ylabel('Cumulative Distribution Function (CDF)')
plt.xlabel('Years since install')
plt.xlim([0,50])
ax = plt.gca()
ax.axes.xaxis.set_visible(False)
ax.axes.yaxis.set_visible(False)
opt = dict(color='r',width=12, headwidth=60, headlength=60)
gca().annotate('',xy=(38,0.5), xycoords='data',xytext =(18,0.5),textcoords = 'data',arrowprops=opt)
#plt.legend(bbox_to_anchor=(1.05, 1.0), loc='bottom');
# 3 sig figs
USyearly3sig = USyearly.copy()
UScum3sig = UScum.copy()
N = 2
UScum3sig = UScum3sig.drop(UScum3sig.index[0])
USyearly3sig = USyearly3sig.drop(USyearly3sig.index[0])
UScum3sig = UScum3sig.loc[:, ~UScum3sig.columns.str.startswith('Waste_MFG_')]
USyearly3sig = USyearly3sig.loc[:, ~USyearly3sig.columns.str.startswith('Waste_MFG_')]
USyearly3sig = USyearly3sig.applymap(lambda x: round(x, N - int(np.floor(np.log10(abs(x))))))
USyearly3sig = USyearly3sig.applymap(lambda x: int(x))
UScum3sig = UScum3sig.applymap(lambda x: round(x, N - int(np.floor(np.log10(abs(x))))))
UScum3sig = UScum3sig.applymap(lambda x: int(x))
materials = ['Module','glass', 'aluminium_frames', 'copper', 'silicon', 'silver']
scencases = ['_base', '_high']
print(" Appendix Table I: Metric Tonnes Installed in field in 2030")
print(" ########################################################### \n")
#Loop over scenarios
for zz in range(0, len(scencases)):
scencase = scencases[zz]
for kk in range (0, len(objects)):
obj = objects[kk].name
print("SCENARIO :", obj), print("~~~~>>>> Case ", scencase)
print("********************************")
print("********************************")
modulemat = 0
for ii in range(0, len(materials)):
installedmat = (UScum3sig['VirginStock_'+materials[ii]+'_'+obj+scencase].loc[2030]-
UScum3sig['Waste_'+materials[ii]+'_'+obj+'_base'].loc[2030])
print(materials[ii], ':', round(installedmat/1000)*1000, 'tons')
print("Capacity in Year 2030 [GW]:", round(UScum3sig['Capacity_'+obj+scencase].loc[2030]/1e9))
print("Capacity in Year 2050 [GW]:", round(UScum3sig['Capacity_'+obj+scencase].loc[2050]/1e9))
print("****************************\n")
UScum3sig
print(" WASTE EoL CUMULATIVE RESULTS [Tonnes] ")
print(" ******************************************")
filter_col = [col for col in UScum3sig if (col.startswith('Waste_EOL_Module')) ]
display(UScum3sig[filter_col].loc[[2016,2020,2030, 2040, 2050]])
UScum['Waste_EOL_Module_PV_ICE_base'].iloc[-1]
print(" WASTE EoL CUMULATIVE RESULTS [Tonnes] ")
print(" ******************************************")
filter_col = [col for col in UScum if (col.startswith('Waste_EOL_Module')) ]
display(UScum[filter_col].loc[[2016,2020,2030, 2040, 050]])
name2 = 'bifacialTrend_high'
name0 = 'bifacialTrend_base'
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
print("Cumulative Virgin Needs by 2050 Million Tones by Scenario for Bifacial Trend")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
name2 = 'Irena_EL_high'
name0 = 'Irena_EL_base'
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
print("Cumulative Virgin Needs by 2050 Million Tones by Scenario for Irena_EL")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
name2 = 'Irena_RL_high'
name0 = 'Irena_RL_base'
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
print("Cumulative Virgin Needs by 2050 Million Tones by Scenario for Irena_RL")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]})
########################
# SUBPLOT 1
########################
#######################
# loop plotting over scenarios
name2 = 'Simulation1_high'
name0 = 'Simulation1_base'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k.', linewidth=5, label='S1: '+name0+' module mass')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='S1: '+name0+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'c.', linewidth=5, label='S2: '+name2+' module mass')
a0.plot(USyearly.index, glassmat, 'c', linewidth=5, label='S2: '+name2+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='c', alpha=0.3,
interpolate=True)
a0.legend()
a0.set_title('Yearly Material Waste by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.set_ylabel('Cumulative Waste by 2050 [Million Tonnes]')
a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
f.tight_layout()
f.savefig(title_Method+' Fig_2x1_Yearly WASTE by Scenario and Cumulatives_NREL2018.png', dpi=600)
print("Cumulative Waste by 2050 Million Tones by case")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_EOL_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]})
########################
# SUBPLOT 1
########################
#######################
# loop plotting over scenarios
name2 = 'Simulation1_high'
name0 = 'Simulation1_base'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k.', linewidth=5, label='S1: '+name0+' module mass')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='S1: '+name0+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'c.', linewidth=5, label='S2: '+name2+' module mass')
a0.plot(USyearly.index, glassmat, 'c', linewidth=5, label='S2: '+name2+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='c', alpha=0.3,
interpolate=True)
a0.legend()
a0.set_title('Yearly Material Waste by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.set_ylabel('Cumulative EOL Only Waste by 2050 [Million Tonnes]')
a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
f.tight_layout()
f.savefig(title_Method+' Fig_2x1_Yearly EOL Only WASTE by Scenario and Cumulatives_NREL2018.png', dpi=600)
print("Cumulative Eol Only Waste by 2050 Million Tones by case")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)